// modules/Home.js
import React, { Component } from 'react';
import { auther } from '../../constants/constant.js';


export default class Auther extends Component{
  render() {
    return (
	    <div>
	    	<ul>
				{
					Object.keys(auther).map((key, index)=>{
						const item = auther[key];
						const typeStr = Object.prototype.toString.call(item);
						if(typeStr==='[object Array]'){
							return <li key={index}>{key+': '}{item.join(', ')}</li> ;
						}else if(typeStr==='[object Object]'){
							return <li key={index}>
								{key+': '}
								<ul>
									{
										Object.keys(item).map((k, i)=>{
											return <li key={i}>{k+': '+item[k]}</li>
										})
									}
								</ul>
							</li> ;
						}else{
							return <li key={index}>{key+': '+item}</li>;
						}
					})
				}
	    	</ul>
	    </div>
    )
  }
}